package org.example.weather.bigscreen.core.repository;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.weather.bigscreen.core.api.dto.AreaDTO;
import org.example.weather.bigscreen.core.entity.TblArea;

import java.util.List;

@Mapper
public interface TblAreaMapper {
    TblArea selectById(@Param("areaId") String areaId);

    List<AreaDTO>selectByIds(@Param("areaIds") List<String> areaIds);

    AreaDTO selectParent(@Param("areaId") String areaId);

    List<AreaDTO> selectAncestors(@Param("areaId") String areaId);

    AreaDTO  selectAncestor(@Param("areaId") String areaId, @Param("level") Integer level);

    List<AreaDTO> selectByParentId(@Param("parentId") String parentId);

    List<AreaDTO> selectDescendants(@Param("parentId") String parentId );

    List<AreaDTO> selectByLevel( @Param("level") Integer level);

    List<AreaDTO> selectAll();

}